<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/11/28 0028
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="jquery/jquery-3.0.0.min.js"></script>
<script>
    $(function () {
        $(":button").click(function () {
            $.ajax({
                type:"get",
                url:"${pageContext.request.contextPath}/tservlet",
                data:"id=01&name=徐益君",
                success:function (msg) {
                    console.log(msg);
                    $("span").text(msg);
                }
            })
        })
    })
</script>
<body>
<input type="button" value="测试">
<span></span>
</body>
</html>
